﻿import request from '/@/utils/request';
enum Api {
  AddKaoshi = '/api/kaoshi/add',
  DeleteKaoshi = '/api/kaoshi/delete',
  UpdateKaoshi = '/api/kaoshi/update',
  PageKaoshi = '/api/kaoshi/page',
  DetailKaoshi = '/api/kaoshi/detail',
  CopyKaoshi = '/api/kaoshi/copy',
  PrintBanji = '/api/kaoshi/printBanji',
  PrintJiaoxueBan = '/api/kaoshi/printJiaoxueBan',
  PrintShichang = '/api/kaoshi/printShichang',
  GetXuenianXueqiXuenianXueqiIdDropdown = '/api/kaoshi/XuenianXueqiXuenianXueqiIdDropdown',
}

// 增加考试
export const addKaoshi = (params?: any) =>
	request({
		url: Api.AddKaoshi,
		method: 'post',
		data: params,
	});

// 删除考试
export const deleteKaoshi = (params?: any) => 
	request({
			url: Api.DeleteKaoshi,
			method: 'post',
			data: params,
		});

// 编辑考试
export const updateKaoshi = (params?: any) => 
	request({
			url: Api.UpdateKaoshi,
			method: 'post',
			data: params,
		});

// 分页查询考试
export const pageKaoshi = (params?: any) => 
	request({
			url: Api.PageKaoshi,
			method: 'post',
			data: params,
		});

// 详情考试
export const detailKaoshi = (id: any) => 
	request({
			url: Api.DetailKaoshi,
			method: 'get',
			data: { id },
		});

export const getXuenianXueqiXuenianXueqiIdDropdown = () =>
		request({
		url: Api.GetXuenianXueqiXuenianXueqiIdDropdown,
		method: 'get'
		});

export const printBanji = (params?: any) => 
		request({
				url: Api.PrintBanji,
				method: 'post',
				data: params,
			});

export const printJiaoxueBan = (params?: any) => 
			request({
					url: Api.PrintJiaoxueBan,
					method: 'post',
					data: params,
				});
			
export const printShichang = (params?: any) => 
		request({
				url: Api.PrintShichang,
				method: 'post',
				data: params,
			});		
			
export const copyKaoshi = (params?: any) => 
			request({
					url: Api.CopyKaoshi,
					method: 'post',
					data: params,
				});